package morning.cat;

import morning.cat.config.ScanConfig;
import morning.cat.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @describe: 类描述信息
 * @author: morningcat.zhang
 * @date: 2020/1/6 10:03 AM
 */
public class Starter1 {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ScanConfig.class);
		Object userService = applicationContext.getBean("userService");
		UserService userService2 = applicationContext.getBean(UserService.class);
		System.out.println(userService == userService2);
	}
}
